package org.example.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import net.sf.oval.constraint.NotBlank;
import net.sf.oval.constraint.NotNull;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表(TSysUser)表实体类
 * @author Calvin
 */
@Setter
@Getter
@ToString
@TableName("t_sys_user")
public class TSysUser extends Model<TSysUser> implements Serializable {
    //用户id
    private Long userId;
    //账号
    @NotNull(message = "[账号]不能为空")
    @NotBlank(message = "[账号]不能为空字符串")
    private String username;
    //密码
    @NotNull(message = "[密码]不能为空")
    @NotBlank(message = "[密码]不能为空字符串")
    private String password;
    //昵称
    private String nickname;
    //头像
    private String avatar;
    //性别
    //@MatchPattern(pattern = "0|1", message = "[性别]错误")
    private Integer sex;
    //手机号
    private String phone;
    //用户状态 0 正常 1冻结
    private Integer status;
    //邮箱
    @NotNull(message = "[邮箱]不能为空")
    @NotBlank(message = "[邮箱]不能为空字符串")
    private String email;
    //是否删除, 0否, 1是
    private Integer deleted;
    //创建人
    private String createBy;
    //更新人
    private String updateBy;
    //创建时间
    private Date createTime;
    //修改时间
    private Date updateTime;
}

